clear
cd "/Users/gwynethmcclendon/Dropbox/Sperber-Zambia/2018-21 research/Papers_Presentations/Gender Paper/Replication Files"


use "pp_endline_cleaned.dta"


gen trackA=.
replace trackA=0 if track=="B" | track=="C"
replace trackA=1 if track=="A"

gen trackB=.
replace trackB=0 if track=="A" | track=="C"
replace trackB=1 if track=="B"

gen trackC=.
replace trackC=0 if track=="A" | track=="B"
replace trackC=1 if track=="C"

gen anyinfofirstlesson=0 if trackA==1
replace anyinfofirstlesson=1 if trackB==1 | trackC==1


** merge baseline
merge 1:1 caseid using "pp_baseline_cleaned.dta"
drop _merge

** merge follow-up

merge 1:1 caseid using "pp_followup_cleaned.dta"
drop _merge

** merge Twilio

*merge 1:1 caseid using "clean_Twilio.dta"
merge 1:1 caseid using "homeworks_count.dta"
drop _merge
merge 1:1 caseid using "homeworkanswers_identity.dta"
drop _merge

** merge post-election survey

merge 1:1 caseid using "post_election_survey.dta"
drop _merge

** merge CCMG behavioral records
merge 1:1 caseid using "ccmg_behavioral.dta"
drop _merge

replace pvt_interest=0 if pvt_interest==.
replace dataanalysist_interest=0 if dataanalysist_interest==.
replace not_registered_knwn=0 if not_registered_knwn==.
replace not_registered_knwn=1 if voting_decision==2

** merge hashtag records

merge 1:1 caseid using "hashtagposts.dta"
replace tot_posts=0 if tot_posts==.
sum tot_posts
reg tot_posts trackB trackC, robust
tab tot_posts track

** merge twitter classifications
drop _merge
merge 1:1 caseid using "poltweets_collapsed.dta" 
gen twitter=0 if num_poltweets_smooth==.
replace twitter=1 if twitter==. 
gen notweets_pol=1 if twitter==1 & num_poltweets_smooth==0
replace notweets_pol=0 if twitter==1 & num_poltweets_smooth>0 & num_poltweets_smooth~=.
replace num_poltweets_smooth=0 if twitter==0
replace num_poltweets_unsmooth=0 if twitter==0
replace num_poltweets_agree=0 if twitter==0
tab num_poltweets_smooth track
gen notweets_pol2=1 if twitter==1 & num_poltweets_agree==0
replace notweets_pol2=0 if twitter==1 & num_poltweets_agree>0 & num_poltweets_agree~=.

** merge FB codings
drop _merge
merge 1:1 caseid using "FB_compiled.dta" 

gen FBaccount=0
replace FBaccount=1 if youthvote2021~=.

gen anyFB=0
replace anyFB=1 if youthvote2021~=0 & youthvote2021~=.
replace anyFB=1 if zambiadecides~=0 & zambiadecides~=.
replace anyFB=1 if canyouremember~=0 & canyouremember~=.
replace anyFB=1 if ref_vote~=0 & ref_vote~=.
replace anyFB=1 if ref_hh~=0 & ref_hh~=.
replace anyFB=0 if anyFB~=1 & FBaccount==1

gen socialmediaaccount=0
replace socialmediaaccount=1 if sharedFBaccount==1 | twitter==1

gen anysocialmediaposts=0
replace anysocialmediaposts=1 if anyFB==1 | (notweets_pol2==0 & twitter==1)

**merge Twitter connections
drop _merge
merge 1:1 caseid using "twitter_connections.dta"


**Treatment
gen track_numbered=1 if track=="A"
replace track_numbered=2 if track=="B"
replace track_numbered=3 if track=="C"
label define tracklabel 1 "Info-Only" 2 "Non-Religious" 3 "Religious"
label values track_numbered tracklabel

***demographics
gen mother_secondary=.
replace mother_secondary=1 if dem_mother_edu==3 | dem_mother_edu==4 | dem_mother_edu==5
replace mother_secondary=0 if dem_mother_edu==1 | dem_mother_edu==2

gen nevermarried=.
replace nevermarried=1 if dem_married==3
replace nevermarried=0 if dem_married==1 | dem_married==2

gen city=.
replace city=1 if dem_live==1
replace city=0 if dem_live==2 | dem_live==3

gen male=dem_gender

recode male (0=1) (1=0), gen(female)

gen postsecondary=.
replace postsecondary=1 if dem_school_grade==3 | dem_school_grade==4
replace postsecondary=0 if dem_school_grade==1 | dem_school_grade==2

gen southernprovince=.
replace southernprovince=1 if province==4
replace southernprovince=0 if province==1 | province==3

gen lusaka=.
replace lusaka=1 if province==1
replace lusaka=0 if province==3 | province==4

gen copperbelt=.
replace copperbelt=1 if province==3
replace copperbelt=0 if province==1 | province==4

sum dem_age, d
gen younger=.
replace younger=1 if dem_age<24 & dem_age~=.
replace younger=1 if dem_age==24 
replace younger=0 if dem_age>24 & dem_age~=.

recode dem_school_grade (-999=.)
sum dem_school_grade, d
gen lesseduc=.
replace lesseduc=1 if dem_school_grade==1 | dem_school_grade==2
replace lesseduc=0 if dem_school_grade==3 | dem_school_grade==4

gen upwardlymobile=.
replace upwardlymobile=1 if mother_secondary<postsecondary
replace upwardlymobile=0 if mother_secondary==postsecondary
replace upwardlymobile=0 if mother_secondary>postsecondary

tab church_type, gen(denom)
		rename denom1 other
		rename denom2 catholic
		rename denom3 pentecostal  
		rename denom4 evangelical  
		rename denom5 mainlineprotestant  
		rename denom6 sda  
		rename denom7 jehovahs 
		rename denom8 none  
*************************************
tab church_frequency, gen(frequency)
rename frequency1 churchdaily
rename frequency2 churchtwotimesweek
rename frequency3 churchonceaweek
rename frequency4 churcheveryfewweeks
rename frequency5 churchonceamonth
rename frequency6 churchonceayear
rename frequency7 churchlessthanayear

sum church_frequency, d
gen morechurchattendance=.
replace morechurchattendance=1 if church_frequency==1 | church_frequency==2
replace morechurchattendance=0 if church_frequency==3 | church_frequency==4 | church_frequency==5 | church_frequency==6 | church_frequency==7 



**baseline levels
gen contacted_baseline=.
replace contacted_baseline=1 if pp_gov_official_baseline==1 
replace contacted_baseline=0 if pp_gov_official_baseline==2 | pp_gov_official_baseline==3 | pp_gov_official_baseline==4

gen wouldcontact_bl=.
replace wouldcontact_bl=1 if pp_gov_official_baseline==1 | pp_gov_official_baseline==2
replace wouldcontact_bl=0 if pp_gov_official_baseline==3 | pp_gov_official_baseline==4

gen protested_baseline=.
replace protested_baseline=1 if pp_peaceful_protest_baseline==1 
replace protested_baseline=0 if pp_gov_official_baseline==2 | pp_gov_official_baseline==3 | pp_gov_official_baseline==4

gen electiontiming_baseline=.
replace electiontiming_baseline=1 if intro_election==3
replace electiontiming_baseline=0 if intro_election==1 | intro_election==2 | intro_election==4 | intro_election==5 | intro_election==6

gen climatecorrect_baseline=.
replace climatecorrect_baseline=1 if intro_climate==2
replace climatecorrect_baseline=0 if intro_climate==1 | intro_climate==3 | intro_climate==4
gen notatalljustified=.
replace notatalljustified=1 if pp_firend_refusal==3
replace notatalljustified=0 if pp_firend_refusal==1 | pp_firend_refusal==2

gen youthidvery=.
replace youthidvery=1 if ide_youth==1
replace youthidvery=0 if ide_youth==2 | ide_youth==3

gen youthidvery_bl=.
replace youthidvery_bl=1 if identity_youth==1
replace youthidvery_bl=0 if identity_youth==2 | identity_youth==3 | identity_youth==4

**outcomes
**endline
gen correct_elections=.
replace correct_elections=1 if pol_elections==3
replace correct_elections=0 if pol_election==1 | pol_election==2 | pol_election==4 | pol_election==5

gen somewhatjustified=.
replace somewhatjustified=1 if pp_firend_refusal==2
replace somewhatjustified=0 if pp_firend_refusal==1 | pp_firend_refusal==3

gen totallyjustified=.
replace totallyjustified=1 if pp_firend_refusal==1
replace totallyjustified=0 if pp_firend_refusal==2 | pp_firend_refusal==3

gen badcitizen=.
replace badcitizen=1 if pp_bad_citizen==2
replace badcitizen=0 if pp_bad_citizen==1 | pp_bad_citizen==3

gen donated=.
replace donated=1 if add_donate==1 | add_donate==2 | add_donate==3
replace donated=0 if add_donate==4

gen voted_pe=.
replace voted_pe=1 if voting_decision==4
replace voted_pe=0 if voting_decision==1 | voting_decision==2 | voting_decision==3 | voting_decision==5

gen wouldvote=.
replace wouldvote=1 if pp_vote==1
replace wouldvote=0 if pp_vote==2 | pp_vote==3

gen wouldnotvote=.
replace wouldnotvote=1 if pp_vote==2
replace wouldnotvote=0 if pp_vote==1 | pp_vote==3

gen wouldmaybevote=.
replace wouldmaybevote=1 if pp_vote==3
replace wouldmaybevote=0 if pp_vote==1 | pp_vote==2


gen wouldviolentprotest=.
replace wouldviolentprotest=1 if pp_protest==1
replace wouldviolentprotest=0 if pp_protest==2 | pp_protest==3

gen wouldnotviolentprotest=.
replace wouldnotviolentprotest=1 if pp_protest==2
replace wouldnotviolentprotest=0 if pp_protest==1 | pp_protest==3

gen havepeacefulprotested=.
replace havepeacefulprotested=1 if pp_peaceful_protest==1
replace havepeacefulprotested=0 if pp_peaceful_protest==2 | pp_peaceful_protest==3

gen wouldpeacefulprotest=.
replace wouldpeacefulprotest=1 if pp_peaceful_protest==2
replace wouldpeacefulprotest=0 if pp_peaceful_protest==3 | pp_peaceful_protest==4
replace wouldpeacefulprotest=1 if pp_peaceful_protest==1


gen wouldmaybepeacefulprotest=.
replace wouldmaybepeacefulprotest=1 if pp_peaceful_protest==3
replace wouldmaybepeacefulprotest=0 if pp_peaceful_protest==2 | pp_peaceful_protest==1


gen wouldpeacefulprotest_withmaybe=.
replace wouldpeacefulprotest_withmaybe=1 if pp_peaceful_protest==1 |pp_peaceful_protest==3
replace wouldpeacefulprotest_withmaybe=0 if pp_peaceful_protest==2

gen wouldvote_baseline=.
replace wouldvote_baseline=1 if pp_vote_baseline==1
replace wouldvote_baseline=0 if pp_vote_baseline==2 | pp_vote_baseline==3

gen wouldvote_followup=.
replace wouldvote_followup=1 if pp_active==1
replace wouldvote_followup=0 if pp_active==2 | pp_active==3

gen wouldmaybevote_baseline=.
replace wouldmaybevote_baseline=1 if pp_vote_baseline==3
replace wouldmaybevote_baseline=0 if pp_vote_baseline==1 | pp_vote==2

gen wouldnotvote_baseline=.
replace wouldnotvote_baseline=1 if pp_vote_baseline==2
replace wouldnotvote_baseline=0 if pp_vote_baseline==1 | pp_vote_baseline==3

gen havepeacefulprotested_bl=.
replace havepeacefulprotested_bl=1 if pp_peaceful_protest_baseline==1
replace havepeacefulprotested_bl=0 if pp_peaceful_protest_baseline==2 | pp_peaceful_protest_baseline==3
replace havepeacefulprotested_bl=0 if pp_peaceful_protest_baseline==4

gen wouldpeacefulprotest_bl=.
replace wouldpeacefulprotest_bl=1 if pp_peaceful_protest_baseline==2
replace wouldpeacefulprotest_bl=0 if pp_peaceful_protest_baseline==3 | pp_peaceful_protest_baseline==4
replace wouldpeacefulprotest_bl=1 if pp_peaceful_protest_baseline==1


gen wouldnotpeacefulprotest_bl=.
replace wouldnotpeacefulprotest_bl=1 if pp_peaceful_protest_baseline==3
replace wouldnotpeacefulprotest_bl=0 if pp_peaceful_protest_baseline==2 | pp_peaceful_protest_baseline==1

**behavioral more
gen signedupforccmg=.
replace signedupforccmg=1 if ccmg_interest==2
replace signedupforccmg=0 if ccmg_interest==1 | ccmg_interest==3

** post-election survey
replace not_registered_knwn=1 if voted_pe==.

gen voted_eligible=.
replace voted_eligible=1 if voting_decision==4
replace voted_eligible=0 if voting_decision==1 | voting_decision==3

gen helped_vote=.
replace helped_vote=1 if voting_help==1 
replace helped_vote=0 if voting_help==2

gen volunteer_pe=.
replace volunteer_pe=1 if political_gatherings==1
replace volunteer_pe=0 if political_gatherings==2

gen attend_pe=.
replace attend_pe=1 if volunteer==1
replace attend_pe=0 if volunteer==2

gen volunteer_pe_dem=.
replace volunteer_pe_dem=1 if free_election==1
replace volunteer_pe_dem=0 if free_election==2

gen discussed_frequently=.
replace discussed_frequently=1 if election_discussion==3
replace discussed_frequently=0 if election_discussion==2 | election_discussion==1

gen discussed_election=.
replace discussed_election=1 if election_discussion==3 | election_discussion==2
replace discussed_election=0 if election_discussion==1

gen verified_voted=.
replace verified_voted=1 if ballot_box==3
replace verified_voted=0 if ballot_box==1 | ballot_box==2 | ballot_box==4 | ballot_box==5 | ballot_box==6 | ballot_box==7


*homework

gen knowledge_office_correct=.
replace knowledge_office_correct=1 if knowledge_office==2
replace knowledge_office_correct=0 if knowledge_office==1 | knowledge_office==3 | knowledge_office==4 | knowledge_office==5 | knowledge_office==6

gen knw_natdebt_correct=.
replace knw_natdebt_correct=1 if nationaldebt==2 
replace knw_natdebt_correct=0 if nationaldebt==1 | nationaldebt==3

gen positive_change_hw=.
replace positive_change_hw=1 if positive_change==1
replace positive_change_hw=0 if positive_change==2 | positive_change==3 

gen positive_change_hw_maybe=.
replace positive_change_hw_maybe=1 if positive_change==1 | positive_change==2
replace positive_change_hw_maybe=0 if positive_change==3 


gen notatalljustified_hw=.
replace notatalljustified_hw=1 if judge_friend==3
replace notatalljustified_hw=0 if judge_friend==2 | judge_friend==1

**follow-up

gen havepeacefulprotested_followup=.
replace havepeacefulprotested_followup=1 if pp_peaceful_protest_followup==1
replace havepeacefulprotested_followup=0 if pp_peaceful_protest_followup==2 | pp_peaceful_protest_followup==3
replace havepeacefulprotested_followup=0 if pp_peaceful_protest_followup==4

gen wouldpeacefulprotest_followup=.
replace wouldpeacefulprotest_followup=1 if pp_peaceful_protest_followup==2
replace wouldpeacefulprotest_followup=0 if pp_peaceful_protest_followup==3 | pp_peaceful_protest_followup==4
replace wouldpeacefulprotest_followup=1 if pp_peaceful_protest_followup==1

gen wouldnotviolentprotest_followup=.
replace wouldnotviolentprotest_followup=1 if pp_violent_protest_followup==2
replace wouldnotviolentprotest_followup=0 if pp_violent_protest_followup==1 | pp_violent_protest_followup==3

gen badcitizen_followup=.
replace badcitizen_followup=1 if pp_badcitizen_followup==2
replace badcitizen_followup=0 if pp_badcitizen_followup==1 | pp_badcitizen_followup==3


gen notatalljustified_followup=.
replace notatalljustified_followup=1 if pp_friend_judge_followup==3
replace notatalljustified_followup=0 if pp_friend_judge_followup==1 | pp_friend_judge_followup==2

gen somewhatjustified_followup=.
replace somewhatjustified_followup=1 if pp_friend_judge_followup==2
replace somewhatjustified_followup=0 if pp_friend_judge_followup==1 | pp_friend_judge_followup==3

gen totallyjustified_followup=.
replace totallyjustified_followup=1 if pp_friend_judge_followup==1
replace totallyjustified_followup=0 if pp_friend_judge_followup==2 | pp_friend_judge_followup==3

**mechanisms
gen internalpolefficacy=1 if bel_complecated==3 | bel_complecated==4
replace internalpolefficacy=0 if bel_complecated==1 | bel_complecated==2

recode bel_succeed (1=4) (2=3) (3=2) (4=1), gen(efficacy1)
recode bel_challenges (1=4) (2=3) (3=2) (4=1), gen(efficacy2)
recode bel_tough (1=4) (2=3) (3=2) (4=1), gen(efficacy3)

recode belief_succeed (1=4) (2=3) (3=2) (4=1), gen(efficacy1_baseline)
recode belief_challenges (1=4) (2=3) (3=2) (4=1), gen(efficacy2_baseline)
recode beilef_tough (1=4) (2=3) (3=2) (4=1), gen(efficacy3_baseline)


capture program drop make_index_gr /*from Cyrus Samii's code ffor make_index_gr for ICW index*/
capture mata: mata drop icwxmata()
program make_index_gr
version 11.1
    syntax anything [if]
    gettoken newname anything: anything
    gettoken wgt anything: anything
	gettoken sgroup anything: anything
    local Xvars `anything'
	marksample touse
  	mata: icwxmata(("`Xvars'"),"`wgt'","`sgroup'", "index")
	rename index index_`newname'
end
 
mata:
	function icwxmata(xvars, wgts, sgroups, indexname)
	{
		st_view(X=0,.,tokens(xvars))
		st_view(wgt=.,.,wgts)
		st_view(sgroup=.,.,sgroups)
		nr = rows(X)
		nc = cols(X)	
		sg_wgt = wgt:*sgroup
		sg_wgtst = sg_wgt/sum(sg_wgt)
		all_wgtst = wgt/sum(wgt)
		sg_wgtstdM = J(1,nc,1) # sg_wgtst
		all_wgtstdM = J(1,nc,1) # all_wgtst
		sg_wgtdmeans = colsum(X:*sg_wgtstdM)
		sgroup2 = sgroup
		sgroupdM = J(1,nc,1) # sgroup2
		sg_meandevs = ((X:*sgroupdM) - (J(nr,1,1) # sg_wgtdmeans):*sgroupdM)
		all_wgtdmeandevs = X - (J(nr,1,1) # sg_wgtdmeans)
		sg_wgtdstds = sqrt(colsum(sg_wgt:*(sg_meandevs:*sg_meandevs)):/(sum(sg_wgt)-1))
		Xs = all_wgtdmeandevs:/(J(nr,1,1) # sg_wgtdstds)
		S = variance(Xs, wgt)
		invS = invsym(S)
		ivec = J(nc,1,1)
		indexout_sc = (invsym(ivec'*invS*ivec)*ivec'*invS*Xs')'
		indexout = indexout_sc/sqrt(variance(indexout_sc, sg_wgt))
		st_addvar("float",indexname)
		st_store(.,indexname,indexout)
	}
end

generate wgt = 1
generate stdgroup=1 

local local_efficacy efficacy1 efficacy2 efficacy3
make_index_gr icwefficacy  wgt stdgroup `local_efficacy'
sum index_icwefficacy

gen efficacyindex=(efficacy1 + efficacy2 + efficacy3)/12 

gen efficacyindex_baseline=(efficacy1_baseline + efficacy2_baseline + efficacy3_baseline)/12

**survey attrition
gen attrited_endline=.
replace attrited_endline=0 if call_detail_el==1
replace attrited_endline=1 if call_detail_el==2 & call_detail_bl==1

gen attrited_pe=.
replace attrited_pe=0 if complete==1 |complete==0
replace attrited_pe=1 if complete==. & call_detail_bl==1

gen attrited_followup=.
replace attrited_followup=0 if call_detail_fu==1
replace attrited_followup=1 if call_detail_fu==2 & call_detail_bl==1

recode attrited_endline (1=0) (0=1), gen(completed_endline)
recode attrited_followup (1=0) (0=1), gen(completed_followup)
recode attrited_pe (1=0) (0=1), gen(completed_pe)

**indices
gen attitudinalindex_endline=(wouldvote + havepeacefulprotested + wouldnotviolentprotest+wouldcontact + badcitizen+pp_volunteer)/6

gen behavioralindexplus=(voted_pe+helped_vote+volunteer_pe+attend_pe+discussed_frequently+donated+signedupforccmg+anysocialmediaposts)/9


*****ANALYSES IN MAIN PAPER**********
**Figure 1
ttest contacted_baseline, by(male) unequal
ttest protested_baseline, by(male) unequal
ttest pp_volunteer_dem_baseline, by(male) unequal

*Figure 2
gen polnotinterested_baseline=.
replace polnotinterested_baseline=1 if ide_politics==4
replace polnotinterested_baseline=0 if ide_politics==1 | ide_politics==2 | ide_politics==3
ttest polnotinterested_baseline, by(male) unequal
gen polnotveryinterested_baseline=.
replace polnotveryinterested_baseline=1 if ide_politics==3
replace polnotveryinterested_baseline=0 if ide_politics==1 | ide_politics==2 | ide_politics==4
ttest polnotveryinterested_baseline, by(male) unequal
gen polsomeinterested_baseline=.
replace polsomeinterested_baseline=1 if ide_politics==2
replace polsomeinterested_baseline=0 if ide_politics==1 | ide_politics==3 | ide_politics==4
ttest polsomeinterested_baseline if (trackA==1 | trackB==1), by(male) unequal
gen polveryinterested_baseline=.
replace polveryinterested_baseline=1 if ide_politics==1
replace polveryinterested_baseline=0 if ide_politics==2 | ide_politics==3 | ide_politics==4
ttest polveryinterested_baseline if (trackA==1 | trackB==1), by(male) unequal


**in text on engagement:
gen totalopenended_count=getinvolved_open_count + identity_open_count + makechange_open_count + courselearned_open_count + challenges_open_count
sum totalopenended_count if (trackA==1 | trackB==1)
ttest totalopenended_count if (trackA==1 | trackB==1), by(trackB)

** Table 1
*column 1
reg knowledge_office_correct anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
*column 2
reg knw_natdebt_correct anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
*column 3
reg positive_change_hw anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1

***Table 2
*column 1
reg attitudinalindex_endline trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (male==0 & (trackB==1 | trackA==1)), robust
sum attitudinalindex_endline if trackA==1 & male==0
*column 2
reg behavioralindexplus trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (male==0 & (trackB==1 | trackA==1)), robust
sum behavioralindexplus if trackA==1 & male==0

*****Figure 6**
reg volunteer_pe_dem trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg voted_pe trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg discussed_frequently trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg anysocialmediaposts trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg signedupforccmg trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg helped_vote trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg donated trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

reg attend_pe trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackC~=1 & male==0), robust

***Table 3
*column 1
reg attitudinalindex_endline trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackB==1 | trackA==1), robust
*column 2
reg behavioralindexplus trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
**column3
gen voted_pe_attrit_upper=voted_pe
replace voted_pe_attrit_upper=1 if male==1 & trackA==0 & attrited_pe==1
*replace voted_pe_attrit_upper=0 if male==1 & trackA==1 & attrited_pe==1
gen helped_vote_attrit_upper=helped_vote
replace helped_vote_attrit_upper=1 if male==1 & trackA==0 & attrited_pe==1
*replace helped_vote_attrit_upper=0 if male==1 & trackA==1 & attrited_pe==1
gen volunteer_pe_attrit_upper=volunteer_pe
replace volunteer_pe_attrit_upper=1 if male==1 & trackA==0 & attrited_pe==1
*replace volunteer_pe_attrit_upper=0 if male==1 & trackA==1 & attrited_pe==1
gen attend_pe_attrit_upper=attend_pe
replace attend_pe_attrit_upper=1 if male==1 & trackA==0 & attrited_pe==1
*replace attend_pe_attrit_upper=0 if male==1 & trackA==1 & attrited_pe==1
gen discussed_freq_attrit_upper=discussed_frequently
replace discussed_freq_attrit_upper=1 if male==1 & trackA==0 & attrited_pe==1
*replace discussed_freq_attrit_upper=0 if male==1 & trackA==1 & attrited_pe==1
gen behavioralindexplus_attrit_upper=(voted_pe_attrit_upper+helped_vote_attrit_upper+volunteer_pe_attrit_upper+attend_pe_attrit_upper+discussed_freq_attrit_upper+donated+signedupforccmg+anysocialmediaposts)/9
reg behavioralindexplus_attrit_upper trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southern lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id   if (trackB==1 | trackA==1), robust
sum behavioralindexplus_attrit_upper if trackA==1

**Figure 7
ttest pp_volunteer_dem_baseline, by(male) unequal
ttest volunteer_pe_dem, by(male) unequal

sum pp_volunteer_dem if male==0 & trackA==1
sum pp_volunteer_dem if male==1 & trackA==1
sum pp_volunteer_dem if male==0 & trackB==1
sum pp_volunteer_dem if male==1 & trackB==1
sum volunteer_pe_dem if male==0 & trackA==1
sum volunteer_pe_dem if male==1 & trackA==1
sum volunteer_pe_dem if male==0 & trackB==1
sum volunteer_pe_dem if male==1 & trackB==1



**Table 4
*column 1
reg internalpolefficacy trackB female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal efficacyindex_baseline i.wave_id if  (trackB==1 | trackA==1), robust
sum internalpolefficacy if trackA==1
*column 2
reg internalpolefficacy trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal efficacyindex_baseline i.wave_id if  (trackB==1 | trackA==1), robust
sum internalpolefficacy if trackA==1
*column 3
gen riskacceptant=.
replace riskacceptant=1 if ide_risk_taking==5
replace riskacceptant=0 if ide_risk_taking==1 | ide_risk_taking==2 | ide_risk_taking==3 | ide_risk_taking==4
reg riskacceptant trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal church_leader i.wave_id if  (trackB==1 | trackA==1), robust
sum riskacceptant if trackA==1
*column 4
gen polveryinterested=.
replace polveryinterested=1 if polinterest_followup==1
replace polveryinterested=0 if polinterest_followup==2 | polinterest_followup==3 | polinterest_followup==4
reg polveryinterested trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal church_leader i.wave_id if  (trackB==1 | trackA==1), robust
sum polveryinterested if trackA==1


******Supplementary Materials********
*Figure C.1 in Afrobarometer file
*Figure C.2 Afrobarometer and our file

**Figure D.2
replace lesson1_complete=0 if lesson1_complete==. & lesson1_complete ~=1
sum lesson1_complete
replace lesson2_complete=0 if lesson2_complete==. & lesson2_complete ~=1
sum lesson2_complete
replace lesson3_complete=0 if lesson3_complete==. & lesson3_complete ~=1
sum lesson3_complete
replace lesson4_complete=0 if lesson4_complete==. & lesson4_complete ~=1
sum lesson4_complete
gen fullcompliance=.
replace fullcompliance=1 if lesson1_complete==1 & lesson2_complete==1 & lesson3_complete==1 & lesson4_complete==1
replace fullcompliance=0 if lesson1_complete==0 | lesson2_complete==0 | lesson3_complete==0 & lesson4_complete==0
sum fullcompliance if (trackA==1 | trackB==1)
gen onelesson=.
replace onelesson=1 if lesson1_complete==1 | lesson2_complete==1 | lesson3_complete==1 | lesson4_complete==1
replace onelesson=0 if fullcompliance==1
replace onelesson=0 if lesson1_complete==1 & lesson2_complete==1 
replace onelesson=0 if lesson1_complete==1 & lesson3_complete==1
replace onelesson=0 if lesson1_complete==1 & lesson4_complete==1
replace onelesson=0 if lesson2_complete==1 & lesson3_complete==1 
replace onelesson=0 if lesson2_complete==1 & lesson4_complete==1 
replace onelesson=0 if lesson3_complete==1 & lesson4_complete==1 
gen twolessons=.
replace twolessons=1 if (lesson1_complete==1 & lesson2_complete) | (lesson1_complete==1 & lesson3_complete) | (lesson1_complete==1 & lesson4_complete) | (lesson2_complete==1 & lesson3_complete) | (lesson2_complete==1 & lesson4_complete) | (lesson3_complete==1 & lesson4_complete)
replace twolessons=0 if lesson1_complete==1 & lesson2_complete==1 & lesson3_complete==1
replace twolessons=0 if lesson1_complete==1 & lesson2_complete==1 & lesson4_complete==1
replace twolessons=0 if lesson1_complete==2 & lesson3_complete==1 & lesson4_complete==1
replace twolessons=0 if lesson1_complete==3 & lesson4_complete==1 & lesson1_complete==1
replace twolessons=0 if fullcompliance==1
replace twolessons=0 if onelesson==1
gen threelessons=.
replace threelessons=1 if (lesson1_complete==1 & lesson2_complete==1 & lesson3_complete) | (lesson1_complete==1 & lesson2_complete==1 & lesson4_complete) | (lesson1_complete==2 & lesson3_complete==1 & lesson4_complete==1) | (lesson1_complete==3 & lesson4_complete==1 & lesson1_complete==1)
replace threelessons=0 if fullcompliance==1
replace threelessons=0 if onelesson==1
replace threelessons=0 if twolessons==1
gen nolessons=0 if lesson1_complete==0 | lesson2_complete==0 | lesson3_complete==0 | lesson4_complete==0
replace nolessons=1 if lesson1_complete==0 & lesson2_complete==0 & lesson3_complete==0 & lesson4_complete==0
gen numberlessons=.
replace numberlessons=0 if nolessons==1
replace numberlessons=1 if onelesson==1
replace numberlessons=2 if twolessons==1
replace numberlessons=3 if threelessons==1
replace numberlessons=4 if fullcompliance==1

twoway histogram numberlessons if (track=="A" | track=="B"), by(track) percent

**Figure D.3
graph bar attrited_endline attrited_followup attrited_pe if (track=="A"|track=="B"), over(track)
sum attrited_endline if (track=="A"|track=="B")
sum attrited_followup if (track=="A"|track=="B")
sum attrited_pe if (track=="A"|track=="B")


**Table D.1 
reg attrited_pe male younger mother_secondary church_pentacostal churchonceaweek nevermarried dem_children city postsecondary lang_english lang_Nyanja lang_Bemba lang_Tonga copperbelt southernprovince if (trackA==1 | trackB==1)


**Table D.2 
*column 1
reg attrited_pe trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if male==1 & (trackA==1|trackB==1), robust
*column 2
reg attrited_pe trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if male==0 & (trackA==1|trackB==1), robust
*column 3
reg attrited_pe trackB##male dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1|trackB==1), robust

**Table E.1
*column 1
sum male dem_age postsecondary mother_secondary nevermarried dem_children lusaka copperbelt southernprovince lang_english lang_Bemba lang_Nyanja lang_Tonga church_leader churchdaily churchtwotimesweek churchonceaweek church_pentacostal if (trackA==1 | trackB==1)
*column 2
sum male dem_age postsecondary mother_secondary nevermarried dem_children lusaka copperbelt southernprovince lang_english lang_Bemba lang_Nyanja lang_Tonga church_leader churchdaily churchtwotimesweek churchonceaweek church_pentacostal if trackA==1
*column 3
sum male dem_age postsecondary mother_secondary nevermarried dem_children lusaka copperbelt southernprovince lang_english lang_Bemba lang_Nyanja lang_Tonga church_leader churchdaily churchtwotimesweek churchonceaweek church_pentacostal if trackB==1


**Table E.2
logit trackB male dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english lang_Bemba lang_Nyanja lang_Tonga church_leader churchtwotimesweek churchonceaweek church_pentacostal if (trackA==1 | trackB==1)
estimates store unconstrained
logit trackB if male!=. & dem_age!=. & postsecondary!=. & mother_secondary!=. & nevermarried!=. & dem_children!=. & lusaka!=. & southernprovince!=. & lang_english!=. & lang_Bemba!=. & lang_Nyanja!=. & lang_Tonga!=. & church_leader!=. & churchtwotimesweek!=. & churchonceaweek!=. & church_pentacostal!=. & (trackA==1 | trackB==1)
lrtest unconstrained

**Table F.1
*column 1
reg knowledge_office_correct anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
*column 2
reg knw_natdebt_correct anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
*column 3
reg positive_change_hw anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1

**Table F.2
*column 1
reg knowledge_office_correct anyinfofirstlesson##female i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
*column 2
reg knw_natdebt_correct anyinfofirstlesson##female  i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
*column 3
reg positive_change_hw anyinfofirstlesson##female  i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1

**Table F.3
*column 1
reg attitudinalindex_endline trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (male==0 & (trackB==1 | trackA==1)), robust
sum attitudinalindex_endline if trackA==1 & male==0
*column 2
reg behavioralindexplus trackB dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (male==0 & (trackB==1 | trackA==1)), robust
sum behavioralindexplus if trackA==1 & male==0

**Table F.4
*column 1
reg attitudinalindex_endline trackB i.wave_id if (male==0 & (trackB==1 | trackA==1)), robust
sum attitudinalindex_endline if trackA==1 & male==0
*column 2
reg behavioralindexplus trackB i.wave_id if (male==0 & (trackB==1 | trackA==1)), robust
sum behavioralindexplus if trackA==1 & male==0

**Table F.5
*column 1
reg attitudinalindex_endline trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackB==1 | trackA==1), robust
sum attitudinalindex_endline if trackA==1
*column 2
reg behavioralindexplus trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum behavioralindexplus if trackA==1
*column 3
reg behavioralindexplus_attrit_upper trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southern lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id   if (trackB==1 | trackA==1), robust
sum behavioralindexplus_attrit_upper if trackA==1

**Table F.6
*column 1
reg attitudinalindex_endline trackB##female i.wave_id if (trackB==1 | trackA==1), robust
*column 2
reg behavioralindexplus trackB##female i.wave_id if (trackB==1 | trackA==1), robust
*column 3
reg behavioralindexplus_attrit_upper trackB##female i.wave_id if (trackB==1 | trackA==1), robust

**Table F.7
reg internalpolefficacy trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal efficacyindex_baseline i.wave_id if  (trackB==1 | trackA==1), robust
sum internalpolefficacy if trackA==1
reg riskacceptant trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal church_leader i.wave_id if  (trackB==1 | trackA==1), robust
sum riskacceptant if trackA==1
reg polveryinterested trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal church_leader i.wave_id if  (trackB==1 | trackA==1), robust
sum polveryinterested if trackA==1

**Table F.8
reg internalpolefficacy trackB##female i.wave_id if  (trackB==1 | trackA==1), robust
reg riskacceptant trackB##female i.wave_id if  (trackB==1 | trackA==1), robust
reg polveryinterested trackB##female  i.wave_id if  (trackB==1 | trackA==1), robust

*Table G.1
*column 1
 mediate (behavioralindexplus, linear) (ide_risk_taking, linear)  (trackB) if trackC!=1  & male==0
*column 2
 mediate (behavioralindexplus, linear) (polinterest_followup, linear)  (trackB) if trackC!=1  & male==0
*column 3
    mediate (behavioralindexplus, linear) (ide_risk_taking, linear)  (trackB) if trackC!=1  & male==1
*column 4
    mediate (behavioralindexplus, linear) (polinterest_followup , linear)  (trackB) if trackC!=1  & male==1

**Table G.2
*column 1
reg id_age trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum id_age if trackA==1
*column 2
reg id_gender trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum id_gender if trackA==1

**Table G.3
*column 1
gen youthpartveryagree=.
replace youthpartveryagree=1 if pp_other_volunteer==1 
replace youthpartveryagree=0 if pp_other_volunteer==3 | pp_other_volunteer==4 | pp_other_volunteer==2
reg youthpartveryagree trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal church_leader i.wave_id if  (trackB==1 | trackA==1), robust
sum youthpartveryagree if trackA==1
*column 2
gen churchpartveryagree=.
replace churchpartveryagree=1 if pp_church_volunteer==1 
replace churchpartveryagree=0 if pp_church_volunteer==3 | pp_church_volunteer==4 | pp_church_volunteer==2
reg churchpartveryagree trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum churchpartveryagree if trackA==1
*column 3
gen neighborhoodpartveryagree=.
replace neighborhoodpartveryagree=1 if pp_your_volunteer==1 
replace neighborhoodpartveryagree=0 if pp_your_volunteer==3 | pp_your_volunteer==4 | pp_your_volunteer==2
reg neighborhoodpartveryagree trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal church_leader i.wave_id if  (trackB==1 | trackA==1), robust
sum neighborhoodpartveryagree if trackA==1

**Table G.4
reg wa_course_interesting trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal  i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_interesting if trackA==1
reg wa_course_bored trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal  i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_bored if trackA==1
reg wa_course_inspired trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal  i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_inspired if trackA==1
reg wa_course_excited trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal  i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_excited if trackA==1
reg wa_course_angry trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_angry if trackA==1
reg wa_course_frustrated trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_frustrated if trackA==1
reg wa_course_happy trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_happy if trackA==1
reg wa_course_tired trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_tired if trackA==1
reg wa_course_sad trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum wa_course_sad if trackA==1

**Table G.5
reg male dem_age postsecondary mother_secondary church_pentacostal churchonceaweek nevermarried dem_children lusaka southernprovince lang_english church_leader catholic if (trackA==1 | trackB==1)


**Table G.6
*column 1
mediate (behavioralindexplus, linear) (internalpolefficacy, linear)  (trackB) if trackC!=1  & male==0
*column 2 
mediate (behavioralindexplus, linear) (id_gender, linear)  (trackB) if trackC!=1  & male==0
*column 3
mediate (behavioralindexplus, linear) (id_age, linear)  (trackB) if trackC!=1  & male==0


**Table G.7
*column 1
mediate (behavioralindexplus, linear) (internalpolefficacy, linear)  (trackB) if trackC!=1  & male==1
*column 2
mediate (behavioralindexplus, linear) (id_gender, linear)  (trackB) if trackC!=1  & male==1
*column 3
mediate (behavioralindexplus, linear) (identity_youth, linear)  (trackB) if trackC!=1  & male==1


**Table G.8
*column 1
mediate (behavioralindexplus_attrit_upper, linear) (internalpolefficacy, linear)  (trackB) if trackC!=1  & male==1 
*column 2
mediate (behavioralindexplus_attrit_upper, linear) (id_gender, linear)  (trackB) if trackC!=1  & male==1
*column 3
mediate (behavioralindexplus_attrit_upper, linear) (identity_youth, linear)  (trackB) if trackC!=1  & male==1


**Table G.9 Multiple Comparisons
**no HTEs**
	reg knowledge_office_correct anyinfofirstlesson dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if male==0 & (trackA==1 | trackB==1), robust
	reg knw_natdebt_correct anyinfofirstlesson dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if male==0 & (trackA==1 | trackB==1), robust
	reg positive_change_hw anyinfofirstlesson dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if male==0 & (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1

**bygender**
reg knowledge_office_correct anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
reg knw_natdebt_correct anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
reg positive_change_hw anyinfofirstlesson##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1
reg attitudinalindex_endline trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackB==1 | trackA==1), robust
sum attitudinalindex_endline if trackA==1
reg behavioralindexplus trackB##female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum behavioralindexplus if trackA==1


**by pentecostal
reg knowledge_office_correct anyinfofirstlesson##church_pentacostal female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek  i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
reg knw_natdebt_correct anyinfofirstlesson##church_pentacostal female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
reg positive_change_hw anyinfofirstlesson##church_pentacostal female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1
reg attitudinalindex_endline trackB##church_pentacostal female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek i.wave_id if (trackB==1 | trackA==1), robust
sum attitudinalindex_endline if trackA==1
reg behavioralindexplus trackB##church_pentacostal female dem_age postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek i.wave_id if  (trackB==1 | trackA==1), robust
sum behavioralindexplus if trackA==1

**by age
reg knowledge_office_correct anyinfofirstlesson##younger female postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
reg knw_natdebt_correct anyinfofirstlesson##younger female  postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
reg positive_change_hw anyinfofirstlesson##younger female postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1
reg attitudinalindex_endline trackB##younger female postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackB==1 | trackA==1), robust
sum attitudinalindex_endline if trackA==1
reg behavioralindexplus trackB##younger female postsecondary mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum behavioralindexplus if trackA==1

**by education
reg knowledge_office_correct anyinfofirstlesson##postsecondary female dem_age mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knowledge_office_correct if trackA==1
reg knw_natdebt_correct anyinfofirstlesson##postsecondary female  dem_age mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum knw_natdebt_correct if trackA==1
reg positive_change_hw anyinfofirstlesson##postsecondary female dem_age mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackA==1 | trackB==1), robust
sum positive_change_hw if trackA==1
reg attitudinalindex_endline trackB##postsecondary female dem_age mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if (trackB==1 | trackA==1), robust
sum attitudinalindex_endline if trackA==1
reg behavioralindexplus trackB##postsecondary female dem_age mother_secondary nevermarried dem_children lusaka southernprovince lang_english church_leader churchtwotimesweek church_pentacostal i.wave_id if  (trackB==1 | trackA==1), robust
sum behavioralindexplus if trackA==1




